package com.example.demo.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Table(name = "store_shop_item")
public class ShopItem {
    @Id
    @Column(name = "shop_id")
    private Long shopId;

    @Id
    @Column(name = "item_id")
    private Long itemId;

    /**
     * 进价
     */
    @Column(name = "buy_price")
    private Float buyPrice;

    /**
     * 售价
     */
    @Column(name = "sell_price")
    private Float sellPrice;

    /**
     * 库存
     */
    @Column(name = "stock")
    private Long stock;

    /**
     * 进货商id
     */
    @Column(name = "buyer_id")
    private Long buyerId;
    
    @Transient
    private String buyerName;

    /**
     * pId=itemId为一组商品
     */
    @Column(name = "p_id")
    private Long pId;

    @Column(name = "creator")
    private String creator;

    @Column(name = "updater")
    private String updater;

    @Column(name = "create_dttm")
    private Date createDttm;

    @Column(name = "update_dttm")
    private Date updateDttm;

    /**
     * @return shop_id
     */
    public Long getShopId() {
        return shopId;
    }

    /**
     * @param shopId
     */
    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    /**
     * @return item_id
     */
    public Long getItemId() {
        return itemId;
    }

    /**
     * @param itemId
     */
    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    /**
     * 获取进价
     *
     * @return buy_price - 进价
     */
    public Float getBuyPrice() {
        return buyPrice;
    }

    /**
     * 设置进价
     *
     * @param buyPrice 进价
     */
    public void setBuyPrice(Float buyPrice) {
        this.buyPrice = buyPrice;
    }

    /**
     * 获取售价
     *
     * @return sell_price - 售价
     */
    public Float getSellPrice() {
        return sellPrice;
    }

    /**
     * 设置售价
     *
     * @param sellPrice 售价
     */
    public void setSellPrice(Float sellPrice) {
        this.sellPrice = sellPrice;
    }

    /**
     * 获取库存
     *
     * @return stock - 库存
     */
    public Long getStock() {
        return stock;
    }

    /**
     * 设置库存
     *
     * @param stock 库存
     */
    public void setStock(Long stock) {
        this.stock = stock;
    }

    /**
     * 获取进货商id
     *
     * @return buyer_id - 进货商id
     */
    public Long getBuyerId() {
        return buyerId;
    }

    /**
     * 设置进货商id
     *
     * @param buyerId 进货商id
     */
    public void setBuyerId(Long buyerId) {
        this.buyerId = buyerId;
    }

    /**
     * 获取pId=itemId为一组商品
     *
     * @return p_id - pId=itemId为一组商品
     */
    public Long getpId() {
        return pId;
    }

    /**
     * 设置pId=itemId为一组商品
     *
     * @param pId pId=itemId为一组商品
     */
    public void setpId(Long pId) {
        this.pId = pId;
    }

    /**
     * @return creator
     */
    public String getCreator() {
        return creator;
    }

    /**
     * @param creator
     */
    public void setCreator(String creator) {
        this.creator = creator;
    }

    /**
     * @return updater
     */
    public String getUpdater() {
        return updater;
    }

    /**
     * @param updater
     */
    public void setUpdater(String updater) {
        this.updater = updater;
    }

    /**
     * @return create_dttm
     */
    public Date getCreateDttm() {
        return createDttm;
    }

    /**
     * @param createDttm
     */
    public void setCreateDttm(Date createDttm) {
        this.createDttm = createDttm;
    }

    /**
     * @return update_dttm
     */
    public Date getUpdateDttm() {
        return updateDttm;
    }

    /**
     * @param updateDttm
     */
    public void setUpdateDttm(Date updateDttm) {
        this.updateDttm = updateDttm;
    }

	public String getBuyerName() {
		return buyerName;
	}

	public void setBuyerName(String buyerName) {
		this.buyerName = buyerName;
	}
    
    
}